<?php

namespace Xinyu\Gen;

use Illuminate\Support\ServiceProvider;
use Xinyu\Gen\Commands\CreateAllCommand;
use Xinyu\Gen\Commands\CreateControllerCommand;
use Xinyu\Gen\Commands\CreateModelCommand;
use Xinyu\Gen\Commands\CreateServiceCommand;
use Xinyu\Gen\Commands\CreateValidatorCommand;
use Xinyu\Gen\Commands\MakeApifoxCommand;
use Xinyu\Gen\Commands\MakePostmanCommand;
use Xinyu\Gen\Commands\MakeRouteCommand;
use Xinyu\Gen\Commands\MakeRPCommand;
use Xinyu\Gen\Commands\RemoveAllCommand;

class XinyuGenProvider extends ServiceProvider
{
    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
    }

    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot()
    {
        // 注册命令行
        if ($this->app->runningInConsole()) {
            $this->commands([
                CreateAllCommand::class,
                CreateControllerCommand::class,
                CreateServiceCommand::class,
                CreateModelCommand::class,
                CreateValidatorCommand::class,
                MakeApifoxCommand::class,
                MakePostmanCommand::class,
                MakeRouteCommand::class,
                MakeRPCommand::class,
                RemoveAllCommand::class,
            ]);
        }
    }
}
